/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Mantenimiento;

import Modelo.Conection;
import java.util.ArrayList;
import javax.swing.JOptionPane;
import java.sql.ResultSet;

/**
 *
 * @author Vladimir
 */
public class Proveedor extends javax.swing.JInternalFrame {
    //instanciando la conexion    
    Conection  conection=new Conection(); 
   public static String ruc="";
   public static Object[][] dtPer; 
   public static int fila = -1;
   public static String[] colum_names={"RUC","RAZON SOCIAL","DIRECCION","E-MAIL", "TELEFONO"};
   public static String columns="ruc,razon_social, direccion,email, telefono";
    
    /**
     * Creates new form AppSuministro
     */
    public Proveedor() {
       initComponents();
        conection.Conectar();
        MostrarTabla();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel8 = new javax.swing.JPanel();
        btnNuevo = new javax.swing.JButton();
        btnAgregar = new javax.swing.JButton();
        btnActualizar = new javax.swing.JButton();
        btnEliminar = new javax.swing.JButton();
        search = new javax.swing.JTextField();
        jLabel5 = new javax.swing.JLabel();
        jPanel2 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        txtRazonSo = new javax.swing.JTextField();
        txtDir = new javax.swing.JTextField();
        txtRuc = new javax.swing.JTextField();
        txtEmail = new javax.swing.JTextField();
        jLabel6 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        txtTel = new javax.swing.JTextField();
        jPanel4 = new javax.swing.JPanel();
        jScrollPane3 = new javax.swing.JScrollPane();
        tabla = new javax.swing.JTable();

        setClosable(true);
        setTitle("MANTENIMIENTO EMPLEADO");
        setAutoscrolls(true);
        setMaximumSize(null);

        jPanel8.setBackground(new java.awt.Color(96, 188, 210));
        jPanel8.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        btnNuevo.setBackground(new java.awt.Color(96, 188, 210));
        btnNuevo.setText("Nuevo");
        btnNuevo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnNuevoActionPerformed(evt);
            }
        });

        btnAgregar.setBackground(new java.awt.Color(96, 188, 210));
        btnAgregar.setText("Agregar");
        btnAgregar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAgregarActionPerformed(evt);
            }
        });

        btnActualizar.setBackground(new java.awt.Color(96, 188, 210));
        btnActualizar.setText("Actualizar");
        btnActualizar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnActualizarActionPerformed(evt);
            }
        });

        btnEliminar.setBackground(new java.awt.Color(96, 188, 210));
        btnEliminar.setText("Eliminar");
        btnEliminar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnEliminarActionPerformed(evt);
            }
        });

        search.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                searchKeyReleased(evt);
            }
        });

        jLabel5.setText("Buscar:");

        javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
        jPanel8.setLayout(jPanel8Layout);
        jPanel8Layout.setHorizontalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addComponent(btnNuevo)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(btnAgregar)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnActualizar)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnEliminar)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabel5)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(search, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        jPanel8Layout.setVerticalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel5)
                        .addComponent(search, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(btnNuevo)
                        .addComponent(btnAgregar)
                        .addComponent(btnActualizar)
                        .addComponent(btnEliminar)))
                .addGap(0, 6, Short.MAX_VALUE))
        );

        jPanel2.setBackground(new java.awt.Color(96, 188, 210));
        jPanel2.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        jLabel1.setText("RUC");

        jLabel2.setText("DIRECCION");

        jLabel3.setText("E-MAIL");

        txtDir.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                txtDirKeyTyped(evt);
            }
        });

        txtRuc.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                txtRucKeyTyped(evt);
            }
        });

        jLabel6.setText("RAZON SOCIAL");

        jLabel4.setText("TELEFONO");

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel2)
                    .addComponent(jLabel1))
                .addGap(16, 16, 16)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtDir, javax.swing.GroupLayout.DEFAULT_SIZE, 258, Short.MAX_VALUE)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(txtRuc, javax.swing.GroupLayout.PREFERRED_SIZE, 183, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(0, 0, Short.MAX_VALUE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                        .addComponent(jLabel6)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(jLabel3)
                        .addGap(45, 45, 45)))
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(txtEmail)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel4)
                        .addGap(18, 18, 18)
                        .addComponent(txtTel, javax.swing.GroupLayout.PREFERRED_SIZE, 139, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(txtRazonSo, javax.swing.GroupLayout.PREFERRED_SIZE, 474, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1)
                    .addComponent(txtRazonSo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtRuc, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel6))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel2)
                        .addComponent(txtDir, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel4)
                        .addComponent(txtEmail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel3)
                        .addComponent(txtTel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(39, Short.MAX_VALUE))
        );

        jPanel4.setBackground(new java.awt.Color(96, 188, 210));
        jPanel4.setAutoscrolls(true);

        tabla.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        tabla.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tablaMouseClicked(evt);
            }
        });
        jScrollPane3.setViewportView(tabla);

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane3)
                .addContainerGap())
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 481, Short.MAX_VALUE)
                .addContainerGap())
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btnNuevoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnNuevoActionPerformed
        // TODO add your handling code here:
        nuevo();
        //ActivarBotones(true,true,false ,false );
    }//GEN-LAST:event_btnNuevoActionPerformed

    private void btnAgregarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAgregarActionPerformed
        // TODO add your handling code here:
       
        if(!txtEmail.getText().isEmpty()&!txtRazonSo.getText().isEmpty()&!txtDir.getText().isEmpty()
            &!txtRuc.getText().isEmpty())
        {
             ArrayList columns_save=new ArrayList();
            columns_save.add("ruc");
            columns_save.add("razon_social");
            columns_save.add("direccion");
            columns_save.add("email");
            columns_save.add("telefono");
            ArrayList product_data=new ArrayList();
            product_data.add(txtRuc.getText());
            product_data.add(txtRazonSo.getText());
            product_data.add(txtDir.getText());
            product_data.add(txtEmail.getText());
            product_data.add(txtTel.getText());
            boolean ok=true;
            try {
                conection.insert(columns_save,product_data, "tproveedor");
                JOptionPane.showMessageDialog(Proveedor.this,"Guardado satisfactoriamente.", "ATENCION", JOptionPane.INFORMATION_MESSAGE);
                //ActivarBotones(true,false,true ,true );
            } catch (Exception e) {
                ok=false;
               // System.out.println(e);
                 JOptionPane.showMessageDialog(Proveedor.this,"ERROR. LLENE LOS CAMPOS CORRECTAMENTE", "ATENCION", JOptionPane.INFORMATION_MESSAGE);
               //ActivarBotones(true,true,false ,false );
            }
            if(ok)
            {
                MostrarTabla();
            }
        }
        else
        {
            JOptionPane.showMessageDialog(Proveedor.this,"ERROR: Complete todos los campos \n", "ATENCION", JOptionPane.ERROR_MESSAGE);
           // ActivarBotones(true,true,false ,false );
        }
        
    }//GEN-LAST:event_btnAgregarActionPerformed

    private void btnActualizarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnActualizarActionPerformed
        // TODO add your handling code here:
       
         
    if(!txtEmail.getText().isEmpty()&!txtRazonSo.getText().isEmpty()&!txtDir.getText().isEmpty()
          &!txtRuc.getText().isEmpty())
      {
          try {
           int row=tabla.getSelectedRow();            
            tabla.setValueAt(txtRuc.getText(), row, 0);
            tabla.setValueAt(txtRazonSo.getText(), row, 1);
            tabla.setValueAt(txtDir.getText(), row, 2);
            tabla.setValueAt(txtEmail.getText(), row, 3);
            tabla.setValueAt(txtTel.getText(), row, 4);
            ArrayList columns_save=new ArrayList();
            columns_save.add("ruc");
            columns_save.add("razon_social");
            columns_save.add("direccion");
            columns_save.add("email");
            columns_save.add("telefono");
            ArrayList product_data=new ArrayList();
            
            product_data.add(txtRuc.getText());
            product_data.add(txtRazonSo.getText());
            product_data.add(txtDir.getText());
            product_data.add(txtEmail.getText());
            product_data.add(txtTel.getText());

          conection.update(columns_save,product_data, "tproveedor"," ruc="+tabla.getValueAt(row, 0).toString());
          JOptionPane.showMessageDialog(Proveedor.this,"Actualizado satisfactoriamente.", "ATENCION", JOptionPane.INFORMATION_MESSAGE);
            } catch (Exception e) {
           //System.out.println(e);
          // JOptionPane.showMessageDialog(Empleado.this,"ERROR. SELECCIONE DATO A ACTUALIZAR ", "ATENCION", JOptionPane.ERROR_MESSAGE);
       }
      }else{
    //System.out.println(e);
        JOptionPane.showMessageDialog(Proveedor.this,"ERROR. SELECCIONE DATO ", "ATENCION", JOptionPane.ERROR_MESSAGE);
     }
        
         //ActivarBotones(true,true,true ,true );
    }//GEN-LAST:event_btnActualizarActionPerformed

    private void btnEliminarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEliminarActionPerformed
        // TODO add your handling code here:        
       if(!txtEmail.getText().isEmpty()&!txtRazonSo.getText().isEmpty()&!txtDir.getText().isEmpty()
            &!txtRuc.getText().isEmpty())
        {
            int row=tabla.getSelectedRow();
            String id=tabla.getValueAt(row, 0).toString();
            conection.delete("tproveedor"," ruc="+id);
           JOptionPane.showMessageDialog(Proveedor.this,"ELIMINADO CORRECTAMENTE.", "ATENCION", JOptionPane.INFORMATION_MESSAGE);
        }else{
            JOptionPane.showMessageDialog(Proveedor.this,"ERROR: SELECCIONE DATO A ELIMINAR", "ATENCION", JOptionPane.ERROR_MESSAGE);
        }
        //actulaizar la tabla
         MostrarTabla();  
         //control de botones
       // ActivarBotones(true,true,true ,true );
    }//GEN-LAST:event_btnEliminarActionPerformed

    private void tablaMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tablaMouseClicked
        fila = tabla.rowAtPoint(evt.getPoint());
        if (fila > -1){
            ruc=tabla.getValueAt(fila,0).toString();
            txtRuc.setText(String.valueOf(tabla.getValueAt(fila, 0)));
            txtRazonSo.setText(String.valueOf(tabla.getValueAt(fila, 1)));
            txtDir.setText(String.valueOf(tabla.getValueAt(fila, 2)));
            txtEmail.setText(String.valueOf(tabla.getValueAt(fila, 3)));
            txtTel.setText(String.valueOf(tabla.getValueAt(fila, 4)));
        }
    }//GEN-LAST:event_tablaMouseClicked

    private void searchKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_searchKeyReleased
        // TODO add your handling code here:
        ResultSet resultsearch;
        if(search.getText().equals(""))
        {
            resultsearch= conection.SelectSimple("tproveedor",columns,"");
        }
        else
        {
            resultsearch = conection.SelectSimple("tproveedor",columns," where razon_social like '%"+search.getText()+"%' order by razon_social");
        }
        tabla.setModel(conection.Tabla(resultsearch, colum_names));
        int nro=tabla.getRowCount();
        if(nro>0)
        {
            ruc=tabla.getValueAt(0,0).toString();
            
            txtRuc.setText(tabla.getValueAt(0, 0).toString());
            txtRazonSo.setText(tabla.getValueAt(0, 1).toString());
            txtDir.setText(tabla.getValueAt(0, 2).toString());
            txtEmail.setText(tabla.getValueAt(0, 3).toString());
            txtTel.setText(tabla.getValueAt(0, 4).toString());
        }else{
         nuevo();
        }

    }//GEN-LAST:event_searchKeyReleased

    private void txtRucKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtRucKeyTyped
        // TODO add your handling code here:
        char car = evt.getKeyChar();
        if(txtRuc.getText().length()>=11) evt.consume();
        if((car<'0' || car>'9')) evt.consume();
    }//GEN-LAST:event_txtRucKeyTyped

    private void txtDirKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtDirKeyTyped
        // TODO add your handling code here:
//        char car = evt.getKeyChar();
//        if(txtDni.getText().length()>=11) evt.consume();
//        if((car<'0' || car>'9')&&car!='.') evt.consume();
    }//GEN-LAST:event_txtDirKeyTyped
    private void nuevo(){
        txtRazonSo.setText("");
        txtDir.setText("");
        txtRuc.setText("");
        txtEmail.setText("");
        txtTel.setText("");
    }
//    private void ActivarBotones(boolean editar,boolean guardar,boolean actualizar,boolean eliminar){
//        btnNuevo.setEnabled(editar);
//        btnActualizar.setEnabled(actualizar);
//        btnAgregar.setEnabled(guardar);
//        btnEliminar.setEnabled(eliminar);
//    }
    public void MostrarTabla() {
        ResultSet result= conection.SelectSimple("tproveedor",columns,"");
        tabla.setModel(conection.Tabla(result, colum_names));
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnActualizar;
    private javax.swing.JButton btnAgregar;
    private javax.swing.JButton btnEliminar;
    private javax.swing.JButton btnNuevo;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JTextField search;
    public static javax.swing.JTable tabla;
    public static javax.swing.JTextField txtDir;
    private javax.swing.JTextField txtEmail;
    public static javax.swing.JTextField txtRazonSo;
    public static javax.swing.JTextField txtRuc;
    private javax.swing.JTextField txtTel;
    // End of variables declaration//GEN-END:variables

   
}
